// 对象赋值 不可取
let a = {
    name01: 'wsz',
    name02: 'sss'
};
let b = a;
b['name01'] = 'aaa';
console.log(a['name01']);
console.log(a.name01 === b.name01);

// 创建单例模式
class A {
    constructor() {
        this.name01 = 'wsz';
        this.name02 = 'sss';
    }
}

let B = new A();
B.name01 = 'aaa';
console.table(A);
console.table(B);